package com.bskj.common.bean.vo;

import com.bskj.common.utils.DateTimeUtil;
import com.bskj.common.utils.StringUtils;

/**
 * 建行无感
 * @author lishi
 * @date 2019年1月25日 上午10:05:47
 */
public class CCBNoSenseParkingOutReqVo {
	private String appId;
	private String merchantCode;
	private String parkingFlag;
	private String channel = "CCB";
	private String extra;
	private String tradeScene = "PARKING";
	private String amount;
	private String notifyUrl;
	private String startTime;
	private String endTime;
	private String plateNumber;
	private String carType = "小型车";
	private String body;
	private String subject;
	private String remark;
	private String freeTime;
	private String parkName;
	private String signType = "MD5";
	private String signKey;

	public CCBNoSenseParkingOutReqVo(String appId, String merchantCode, String parkingFlag, String amount,
			String notifyUrl, String startTime, String endTime, String plateNumber,
			String parkName,String signType, String signKey) {
		this.appId = appId;
		this.merchantCode = merchantCode;
		this.parkingFlag = parkingFlag;
		this.amount = amount;
		this.notifyUrl = notifyUrl;
		this.startTime = startTime;
		this.endTime = endTime;
		this.plateNumber = plateNumber;
		this.parkName = parkName;
		this.signType = signType;
		this.signKey = signKey;
	}
	
	
	public void setTradeScene(String tradeScene) {
		this.tradeScene = tradeScene;
	}



	public String getExtra() {
		return extra;
	}

	public void setExtra(String extra) {
		this.extra = extra;
	}

	public String getCarType() {
		return carType;
	}

	public void setCarType(String carType) {
		this.carType = carType;
	}

	public String getAppId() {
		return appId;
	}

	public String getMerchantCode() {
		return merchantCode;
	}

	public String getParkingFlag() {
		return parkingFlag;
	}

	public String getChannel() {
		return channel;
	}

	public String getTradeScene() {
		return tradeScene;
	}

	public String getAmount() {
		return amount;
	}

	public String getNotifyUrl() {
		return notifyUrl;
	}

	public String getStartTime() {
		return startTime;
	}

	public String getEndTime() {
		return endTime;
	}

	public String getChargingTime() {
		long chargingTime = 0;
		try {
			long inTimes = DateTimeUtil.string2Date(startTime, "yyyyMMddHHmmss").getTime();
			long endTimes = DateTimeUtil.string2Date(endTime, "yyyyMMddHHmmss").getTime();
			chargingTime = (endTimes - inTimes) / 1000;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return chargingTime + "";
	}

	public String getPlateNumber() {
		return plateNumber;
	}

	public String getBody() {
		if (StringUtils.isBank(this.body)) {
			return parkName + "无感支付";
		}
		return this.body;
	}

	public String getSubject() {
		if (StringUtils.isBank(this.subject)) {
			return parkName + "无感支付";
		}
		return this.subject;
	}

	public String getRemark() {
		if (StringUtils.isBank(this.remark)) {
			return parkName + "无感支付";
		}
		return this.remark;
	}

	public void setBody(String body) {
		this.body = body;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getFreeTime() {
		return freeTime;
	}

	public String getParkName() {
		return parkName;
	}

	public String getSignType() {
		return signType;
	}

	public String getSignKey() {
		return signKey;
	}
}
